#ifndef SKYID_RENDER_H
#define SKYID_RENDER_H

#include <GL/gl.h>
#include <GL/glext.h>

#include "common.h"
#include "object.h"
#include "window.h"
#include "texture.h"
#include "sprite.h"

namespace SkyID
{

//- RenderState ---------------------------------------------------------------

struct RenderState
{
	bool enableTexture;
	bool enableBlend;
	bool enableDepthTest;
	bool enableTextureCoordArray;
	bool enableVertexArray;
	GLuint textureID;
};

//- Render --------------------------------------------------------------------

namespace Render
{

bool initialize(const Config &config);
void shutdown();

void beginScene();
void endScene();

void setTextureEnbale(bool enable);
void bindTexture(const Texture *texture);

void setColor(const Color &color);

void renderVertices(GLenum mode, const Vertex* v, uint32 n);

void renderSprite(const Sprite *sprite, float x, float y, float w = 0.0f, float h = 0.0f);

} // namespace Render

} // namespace SkyID

#endif // SKYID_RENDER_H
